package com.jsh.frame.myframe2.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.jsh.frame.myframe2.utils.LogUtil;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public abstract class BaseActivity extends AppCompatActivity {
    public LogUtil logUtil = new LogUtil(getClass());

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentRes());
        ButterKnife.bind(this);
        Logger.addLogAdapter(new AndroidLogAdapter());//初始化日志工具

        initData();
        initView();

    }

    abstract int getContentRes();

    abstract void initView();

    abstract void initData();
}
